package cn.zsb.zsb.vo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.*;
/**
 * @author oldliu
 * @since 1.0
 */
@Component
@ConfigurationProperties(prefix = "myredis")
public class RedisConfig {
    private int port;
    private int timeOut;///!!!!
    private List<String> hosts=new ArrayList<>(0);

    private Map<String,String>keys=new HashMap<>(0);

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getTimeOut() {
        return timeOut;
    }

    public void setTimeOut(int timeOut) {
        this.timeOut = timeOut;
    }

    public List<String> getHosts() {
        return hosts;
    }

    public void setHosts(List<String> hosts) {
        this.hosts = hosts;
    }

    public Map<String, String> getKeys() {
        return keys;
    }

    public void setKeys(Map<String, String> keys) {
        this.keys = keys;
    }

    @Override
    public String toString() {
        return "RedisConfig{" +
                "port=" + port +
                ", timeOut=" + timeOut +
                ", hosts=" + hosts +
                ", keys=" + keys +
                '}';
    }
}
